package com.zzedu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzedu.common.annotation.Excel;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 作业本信息对象 zz_exercise_book
 *
 * @author Mr.Wang
 * @date 2025-06-02
 */
@TableName("zz_exercise_book")
public class ZzExerciseBook implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 班级ID
     */
    @Excel(name = "班级ID")
    private Long clazzId;

    /**
     * 绘本ID
     */
    @Excel(name = "绘本ID")
    @NotNull(message = "绘本ID不能为空")
    private Long pictureBookId;

    /**
     * 节点ID
     */
    @Excel(name = "节点ID")
    private Long nodeId;

    /**
     * 题目id
     */
    @Excel(name = "题目id")
    @NotNull(message = "题目id不能为空")
    private Long contentId;

    /**
     * 学生id
     */
    @Excel(name = "学生id")
    private Long studentId;

    /**
     * 提交次数
     */
    @Excel(name = "提交次数")
    private Integer submitCount;

    /**
     * 批改状态 0-待批改 1-已完成(针对选择题直接写已完成)
     */
    @Excel(name = "批改状态 0-待批改 1-已完成(针对选择题直接写已完成)")
    private Integer correctState;

    /**
     * 题目得分[扩展,后期考试使用]
     */
    @Excel(name = "题目得分[扩展,后期考试使用]")
    private BigDecimal examScore;

    /**
     * 最新提交内容
     */
    @Excel(name = "最新提交内容")
    private Long submitId;

    /**
     * 批改人
     */
    @Excel(name = "批改人")
    private Long correctTeacherId;

    /**
     * 添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @NotNull(message = "添加时间不能为空")
    private LocalDateTime gmtCreate;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @NotNull(message = "更新时间不能为空")
    private LocalDateTime gmtModify;

    /**
     * 逻辑删除(0：未删除 1：id)
     */
    @Excel(name = "逻辑删除(0：未删除 1：id)")
    @TableLogic(delval = "id")
    @TableField(fill = FieldFill.INSERT)
    @NotNull(message = "逻辑删除(0：未删除 1：id)不能为空")
    private Integer deleted;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    /**
     * 视频时长(S)
     */
    private Long videoTime;

    /**
     * 页面停留时长(S)
     */
    private Long remainTime;

    /**
     * 正确次数
     */
    private Integer correctCount;

    /**
     * 错误次数
     */
    private Integer errorCount;

    /**
     * 参与统计
     */
    private Integer calcFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getClazzId() {
        return clazzId;
    }

    public void setClazzId(Long clazzId) {
        this.clazzId = clazzId;
    }

    public Long getPictureBookId() {
        return pictureBookId;
    }

    public void setPictureBookId(Long pictureBookId) {
        this.pictureBookId = pictureBookId;
    }

    public Long getNodeId() {
        return nodeId;
    }

    public void setNodeId(Long nodeId) {
        this.nodeId = nodeId;
    }

    public Long getContentId() {
        return contentId;
    }

    public void setContentId(Long contentId) {
        this.contentId = contentId;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Integer getSubmitCount() {
        return submitCount;
    }

    public void setSubmitCount(Integer submitCount) {
        this.submitCount = submitCount;
    }

    public Integer getCorrectState() {
        return correctState;
    }

    public void setCorrectState(Integer correctState) {
        this.correctState = correctState;
    }

    public BigDecimal getExamScore() {
        return examScore;
    }

    public void setExamScore(BigDecimal examScore) {
        this.examScore = examScore;
    }

    public Long getSubmitId() {
        return submitId;
    }

    public void setSubmitId(Long submitId) {
        this.submitId = submitId;
    }

    public Long getCorrectTeacherId() {
        return correctTeacherId;
    }

    public void setCorrectTeacherId(Long correctTeacherId) {
        this.correctTeacherId = correctTeacherId;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(LocalDateTime gmtModify) {
        this.gmtModify = gmtModify;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Long getVideoTime() {
        return videoTime;
    }

    public void setVideoTime(Long videoTime) {
        this.videoTime = videoTime;
    }

    public Long getRemainTime() {
        return remainTime;
    }

    public void setRemainTime(Long remainTime) {
        this.remainTime = remainTime;
    }

    public Integer getCorrectCount() {
        return correctCount;
    }

    public void setCorrectCount(Integer correctCount) {
        this.correctCount = correctCount;
    }

    public Integer getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(Integer errorCount) {
        this.errorCount = errorCount;
    }

    public Integer getCalcFlag() {
        return calcFlag;
    }

    public void setCalcFlag(Integer calcFlag) {
        this.calcFlag = calcFlag;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
